<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="<s:url value="/css/style.css"/>" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript" src="<s:url value="/js/jquery.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/js/common.js"/>"></script>
		<script type='text/javascript' src="<s:url value="/js/tableSel2.js"/>"></script>
		<script type="text/javascript">
function dosubmit(){

	$('#listForm').submit();
}
function goEdit(){
	location.href='<s:url value="/data/ClassLevel/edit"/>';
}
function goDelete(form){
	if(window.confirm('Delete selected items?')) {
		form = document.getElementById('listForm');
		var ids = getSelectionIds('a');
		if(ids.length<1){
			alert('Please select one at least.');
		}else{
			form.action=form.action.replace('list','delete');
			$('#ids').val(ids);
			form.submit();
		}
	}
}
</script>
		<title><s:text name="system.title" />
		</title>
	</head>
	<body>
		<s:include value="/common/up.jsp"></s:include>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="box">
					<s:form action="ClassLevel/list" name="listForm" id="listForm"
						namespace="/data">
						<input type="hidden" id="startIndex" name="startIndex" value="0" />
						<s:hidden name="ids" id="ids" />
						<table width="100%" border="0" cellpadding="0" cellspacing="0"
							class="searchbg">
							<tr>
								<td>
									&nbsp;
									<img onclick="javascript:goEdit();"
										src="<s:url value="/img/right/btn1.gif"/>" border="0"
										align="absmiddle" />
									<img onclick="goDelete(this.form);"
										src="<s:url value="/img/right/btn2.gif"/>" border="0"
										align="absmiddle" />
								</td>
							</tr>
						</table>

						<table width="100%" border="0" cellpadding="0" cellspacing="1"
							class="box2 activeTable">
							<tr>
								<td width="33" class="tablecolour1">
									<input type="checkbox" name="all" onclick="checkAll('a',this)" />
								</td>
								<td class="tablecolour1">
									Name
								</td>
								<td class="tablecolour1">
									Color
								</td>
								<td class="tablecolour1">
									Category
								</td>
								<td class="tablecolour1">
									Description
								</td>
								<td class="tablecolour1">
									Function
								</td>
							</tr>
							<s:iterator value="listResult.items" status="status">
								<tr>
									<td class="tablecolour2">
										<input type="checkbox" name="a"
											value="<s:property value="id" />" />
									</td>
									<td class="tablecolour2">
										<s:property value="name" />
									</td>
									<td bgcolor='<s:property value=" color"/>'>
									
									</td>
									<td class="tablecolour2">
										<s:property value="category" />
									</td>
									<td class="tablecolour2">
										<s:property value="description" />
									</td>
									<td class="tablecolour2">
										<a
											href='<s:url value="/data/ClassLevel/edit?id="/><s:property value="id"/>'>Edit</a>
									</td>
								</tr>
							</s:iterator>
						</table>
						<s:include value="/common/page.jsp"></s:include>
					</s:form>
				</td>
			</tr>
		</table>
		<s:include value="/common/down.jsp"></s:include>
	</body>
</html>